package com.dgy.user.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dgy.user.mapper.SysUserQualificationMapper;
import com.dgy.user.domain.SysUserQualification;
import com.dgy.user.service.ISysUserQualificationService;

/**
 * 用户工作资质信息Service业务层处理
 *
 * @author ccc
 * @date 2025-03-12
 */
@Service
public class SysUserQualificationServiceImpl implements ISysUserQualificationService
{
    @Autowired
    private SysUserQualificationMapper sysUserQualificationMapper;

    /**
     * 查询用户工作资质信息
     *
     * @param userId
     * @return 用户工作资质信息
     */
    @Override
    public SysUserQualification selectSysUserQualificationByUserId(Long userId)
    {
        return sysUserQualificationMapper.selectSysUserQualificationById(userId);
    }


    /**
     * 新增用户工作资质信息
     *
     * @param sysUserQualification 用户工作资质信息
     * @return 结果
     */
    @Override
    public int insertSysUserQualification(SysUserQualification sysUserQualification)
    {
        sysUserQualification.setCreateTime(DateUtils.getNowDate());
        return sysUserQualificationMapper.insertSysUserQualification(sysUserQualification);
    }

    /**
     * 修改用户工作资质信息
     *
     * @param sysUserQualification 用户工作资质信息
     * @return 结果
     */
    @Override
    public int updateSysUserQualification(SysUserQualification sysUserQualification)
    {
        sysUserQualification.setUpdateTime(DateUtils.getNowDate());
        return sysUserQualificationMapper.updateSysUserQualification(sysUserQualification);
    }

    /**
     * 批量删除用户工作资质信息
     *
     * @param ids 需要删除的用户工作资质信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserQualificationByIds(Long[] ids)
    {
        return sysUserQualificationMapper.deleteSysUserQualificationByIds(ids);
    }

    /**
     * 删除用户工作资质信息信息
     *
     * @param id 用户工作资质信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserQualificationById(Long id)
    {
        return sysUserQualificationMapper.deleteSysUserQualificationById(id);
    }
}
